package mysql

import "gorm.io/gorm"

type Shop struct {
	gorm.Model
	ShopName  string  `gorm:"type:varchar(30);not null"`
	ShopPrice float64 `gorm:"type:decimal(10,2);not null"`
	ShopStock int     `gorm:"type:int(11);not null"`
	UserId    int     `gorm:"type:int(11);not null"`
}

func (s *Shop) ShopAdd(db *gorm.DB) error {
	return db.Debug().Create(s).Error
}
